package com.gomyb.utils;

import org.springframework.util.ObjectUtils;

public class StringUtils {

    /**
     * java去除字符串中的回车、换行符、制表符 替换为空格
     */
    public static String replaceSQLSign(String str) {
        String dest = "";
        if (str != null) {
            dest = str.replaceAll("\t|\r|\n", " ");
        }
        return dest;
    }


    public static boolean contain(String str, String[] args) {
        if (ObjectUtils.isEmpty(args)) {
            return false;
        }

        for (String userReceive : args) {
            if (userReceive.equals(str)) {
                // 包含
                return true;
            }
        }
        return false;
    }

}
